package com.ns.school.mapper.sys;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ns.school.po.sys.Role;
import com.ns.school.po.sys.User;
import org.apache.ibatis.annotations.Param;

import java.util.Map;
import java.util.Set;

public interface UserMapper extends BaseMapper<User> {

    User selectUserByMap(Map<String, Object> map);

    void saveUserRoles(@Param("userId") Integer id, @Param("roleIds") Set<Role> roles);

    void dropUserRolesByUserId(@Param("userId") Integer id);
}